<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "dh_user".
 *
 * @property integer $id
 * @property string $nickname
 * @property string $openid
 * @property string $header
 * @property integer $sex
 * @property string $tel
 * @property string $session_code
 * @property integer $flag
 * @property integer $create_time
 */
class DhUser extends \common\components\ActiveRecord2015
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'dh_user';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['sex', 'flag', 'create_time'], 'integer'],
            [['nickname', 'openid', 'header', 'session_code'], 'string', 'max' => 255],
            [['tel'], 'string', 'max' => 30]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'nickname' => 'Nickname',
            'openid' => 'Openid',
            'header' => 'Header',
            'sex' => 'Sex',
            'tel' => 'Tel',
            'session_code' => 'Session Code',
            'flag' => 'Flag',
            'create_time' => 'Create Time',
        ];
    }
}
